4. Basic Usage

4.1 The Emulated Commodore 64

Unlike other C64 emulators, Power64 is capable of handling several emulated C64 at one time. The number of concurrent C64s is only limited by the available RAM. To create a new C64 select File/New (Cmd-N). Choose File/Close (Cmd-W) to close a C64 window no longer needed.

Even so the original C64 did not have a reset button built in, many people built one into their C64. Select File/Reset (Cmd-K) to reset the current C64 window. To force a hard-reset that circumvents the reset-protection of many games press the Option key while selecting File/Reset (or Option-Cmd-K).

To bring the C64 back to a well responsive state, when it is stuck in an endless loop (or something similar), the C64 featured the key combination Stop/Restore. This effect can be obtained in Power64 by selecting File/Stop/Restore (Cmd-R). Again pressing the Option key forces a hard Restore.

To quickly suspend all activity in a C64 window, select File/Freeze (Cmd-F). This will freeze the C64 until File/Freeze is activated again. To indicate the frozen state the window name will be surrounded by dots. This is a very useful feature, if you need to answer the phone or door in the middle of an exciting game. To conserve the current state of an C64 over longer periods of time see also: 4.3 RAM Images.

To create a hardcopy of the current C64 screen, select File/Print (Cmd-P). Depending on your printer you can choose to print either in color or in black/white. To print only a portion of the screen, click&drag the mouse to select the part of the screen that you are interested in. It is often advantageous to first Freeze the C64 (see above), so that the image does not change, before making a selection or hardcopy.

It is also possible to copy the contents of the C64 screen to insert it in a document of an other application. To do this click&drag the mouse to define the area of interest (or select Edit/Select All (Cmd-A) to select the entire screen) and then choose Edit/Cut (Cmd-X) or (equivalently) Edit/Copy (Cmd-C) to copy the selected area. The clipboard will now contain a PICT image of the selected area that can be inserted in any paint program. If the C64s screen was in plain text mode the clipboard will also contain the selected screen area as TEXT, for insertion in a text editor or word processor.

It is also possible to paste text into a Power64 window. This makes it easy to develop a C64 program using your favorite Macintosh editor, and then 'type' it into the C64 via Cut&Paste. Try this with the Emulator detection program in Appendix D.

File/Quit (Cmd-Q) terminates Power64. (Surprise, Surprise).

4.2 Storage Devices

A C64 can be connected to up to four 5.25" floppy disk drives (devices #8-11) and one modified (audio-)cassette tape recorder (device #1) called a Datasette. All these storage devices can be emulated by Power64.

Floppy disks are emulated most precisely using D64, X64 or ZipCoded files (Appendix C.3 , C.4 and C.5). To use a D64, X64 or Zipcode file, it is necessary to 'insert' it in the virtual disk drive using Devices/Disk Drive #x/Insert Floppy Disk.Once it is inserted it can be accessed like on a real C64 using BASIC or assembly language programs. If you are not familiar with C64 BASIC and are just interested in playing games see Section 2.4 to learn the necessary commands. To see what files are already available on the currently mounted disk choose Devices/Disk Drive #x/Display Directory. A window will be opened that shows the names and sizes (in Blocks of 254 Bytes) of all files on the disk. Double-click on a name, and the game will automatically be loaded. To remove a disk from a drive use Devices/Disk Drive #x/Eject Disk. Unlike on a real C64 Power64 will properly close all files before ejecting the disk. Note that Power64 will automatically eject the current disk when a new one is inserted.

To create a new disk select Devices/Disk Drive #x/Create New Floppy Disk. This new disk is already formatted, thus it is not necessary to issue a NEW (format) command before using the disk.

Power64 features two modes of Floppy support. You can either have the Mac simulate the Floppy in PowerPC native code. This is very fast (up to 1000x faster than a real 1541) but some games that use fast loaders or other special tricks of the 1541 will crash as this emulation does not support every single feature. On the other hand you can choose a complete floppy emulation, that will support most of the these games. Unfortunatly this complete emulation also emulates the original speed of a 1541 of only about 256 Bytes/second and puts extra stress on tha Mac CPU. To switch between these two mode choose Devices/Disk Drive #(8/9)/Complete Floppy 1541 Emulation. Note that the complete emulation is only available on drives 8 and 9 and can only be used with D64, X64 or ZipCoded files, but not with T64 or Lynx files nor Mac Folders that are mounted as floppy disks (see below).

Furthermore it is possible to use a folder on the Macintosh hard disk, as a floppy disk for the C64 and use games in C64 program format (P00, C64, CBM - see Appendix C.1/C.2). To make a Macintosh folder simulate a floppy disk drive choose: Devices/Disk Drive #x/Attach Hard Disk. Now the Macintosh folder behaves just like a C64 floppy disk. Of course the C64 was not designed with such an option in mind, and some C64-programs, that are tightly coupled with the floppy disk drive, won't run from hard disk. The hard disk will only perform the most basic floppy commands like LOAD/SAVE or OPEN, but the none of the fancy floppy commands (like SCRATCH). This is done on purpose, to make sure that no C64 program can cause serious damage to the Mac hard disk.

It is also possible to mount a T64 tape or Lynx file (see Appendix C.6/C.7  for a description of the file formats) on a disk drive by choosing Devices/ Disk Drive #x/ Mount Tape/Lynx. As with the Mac hard disk only a selection of commands is available. 
Also it might seem queer to mount a tape in a disk drive some of the T64 and especially Lynx files that are available on the internet expect to be used on a disk drive.

To emulate the Datasette tape drive Power64 uses T64 and Lynx files (see Appendix C.6/C.7). To 'insert' a T64 or Lynx file in the virtual tape drive select Devices/Tape Drive/Mount Tape (Cmd-T). Just as with Floppy Disk there is an option to create a blank tape image (Devices/Tape Drive/ Create New Tape) and to display the contents of a T64 or Lynx file (Devices/Tape Drive/Display Directory). Note that the file size in a tape directory is give in Bytes rather than Blocks.

To keep an eye on the floppy disk (and hard disk) activity of a C64 select Devices/Drive Status LEDs (Cmd-L; Use Opt-Cmd-L to display the LEDs in all C64 windows). This will cause Power64 to display two symbols per enabled disk drive in the bottom left corner. The first symbols stands for the floppy LED. If it is off (gray) the floppy drive is idle. A green LED indicates a read access, a red LED a write access and a yellow LED stands of an open file without read or write activity. The second symbol indicates the floppy error status; a green check means Ok, a red cross indicates an error. To determine the nature of the error, look at the bottom of the corresponding directory window. You can also use the following sequence of BASIC commands.
   10 OPEN 1,8,15
  20 INPUT#1, EN$, ER$, TR$, SC$
  30 CLOSE 1
  40 PRINT EN$, ER$, TR$, SC$
  RUN
 If Complete Floppy  1541 emulation is selected Power64 also displays the track that the floppy head currently uses in the bottom row of the directory window. As loading a file can take quite a while in this emulation mode, it is always reassuring to see the head move from track to track once in a while to know that something is happening.   

4.3 RAM Images

Power64 provides the possibility to save the current state of the C64 to a Macintosh file. Thus it is easy to interrupt a game at any point, save it to disk, try the next level and when it was not successful then simply restore to the saved position.

Note that also also this feature is called a RAM image, it also saves the contents of the CPU registers and the state of the VIC, SID and CIAs. Furthermore it saves the contents of the REU (if present) and the state of all completly emulated 1541 disk drives.  Furthermore the tapes and disks that were attached are recovered, if they are again available on the computer. For reasons of Mac disk space efficiency the disks/tapes do not become part of the RAM image.  Note that the above does not include any options (like joystick auto-fire).

To create a RAM Image, select File/Save RAM Image (Cmd-S). To restore it choose File/Load RAM Image (Cmd-O). Note that a new emulator window will automatically be created for the loaded RAM image. Thus it is not necessary to open a new window before loading a RAM image, and it is impossible to destroy the contents of any other currently open window.